{__NOLAYOUT__}
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport"
		  content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
	<title>提现记录</title>
	{include file="public/script" /}
</head>
<body>
	<div class="sectionH  sectionH2 mui-clearfix">
		<header class="mui-bar mui-bar-nav" style="">
			<a class="mui-icon mui-icon-left-nav  mui-pull-left" href="javascript:history.back(-1)" style="color: #727272;"></a>
			<h1 class="mui-title">提现记录</h1>
			<!--<a class="mui-icon mui-pull-right right1" href="assets-1.html"><img src="images/icon_setting.png"/></a>-->
		</header>
	</div>
	<div class="kong1"></div>
	<div class="tixian1_section1" style="position: absolute;z-index: 2;width: 100%;height: 93%;">
		<div class="container" style="position: absolute;width: 100%;z-index: 1;">
			<ul class="lllcon" style="position: relative;">
				{volist name="list" id="item"}
				<li class="mui-clearfix">
					<p class="p1">{$item.create_time|date='Y-m-d H:i:s',###}</p>
					<p class="p2">{$item.money}</p>
				</li>
				{/volist}
			</ul>
		</div>
	</div>
	
</body>
<script>
    mui.init({
        pullRefresh: {
            container: '.tixian1_section1',
            down: {

            },
            up: {
                auto:false,
                contentrefresh: '正在加载...',
                callback: pullupRefresh
            }
        }

    });

    var count = 1;
    var finish = false;
    function pullupRefresh() {
        setTimeout(function() {
            ++count;

            $.ajax({
                type: "POST",
                url: "{:url('User/withdrawList')}",
                data: {page:count},
                dataType: "json",
                success: function(data){
                    if(data.result_code==='0000'){
                        var list = data.result_data.list;
                        if(list.length===0){
                            finish=true;
                        }
                        mui('.tixian1_section1').pullRefresh().endPullupToRefresh((finish)); //参数为true代表没有更多数据了。
                        var table = document.body.querySelector('.lllcon');
                        if(list.length>0){
                            for(var i=0;i<list.length;i++){

                                var html = '<p class="p1">'+DateToTime(list[i].create_time,'Y-m-d H:i:s')+'</p>' +
                                    '<p class="p2"> '+list[i]['money']+'</p>';


                                var li = document.createElement('li');

                                li.className='mui-clearfix';
                                li.innerHTML = html;

                                table.appendChild(li);
                            }
                        }
                    }else if(data.result_code==='1111'){
                        mui.alert('请登录','',function(){
                            window.location.href='/Login/login';
                        });
                    }else{
                        mui.alert(data.result_info);
                    }

                }
            });
        }, 500);
    }
</script>
</html>